05. Do Something When the Button is Clicked

Do Something When the Button is Clicked

Question:

Start Quiz:

Solution:

INSTRUCTOR NOTE:

IMPORTANT: Note if you copy and paste the code, you must add your package at the top of the file (there's a comment about it). The package name can be found in the project's AndroidManifest.xml file.

The package name our example uses is :
*package com.example.android.justjava; *

If after you add the package and still see a line through some of the words, just ignore it for now. The code should still work perfectly!


Here are the words we introduced in this video:

  • Programming language
  • Java
  • Event-driven programming
  • Activity
  • Comments
  • Package name
  • Import statements
  • Class name
  • onCreate()

You can look up their definitions in the Vocab Glossary.